package com.pantuo.sys.pojo;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pantuo.common.pojo.Statistics;
import com.pantuo.sys.bo.StatisticsTwoBo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@NoArgsConstructor
@AllArgsConstructor
@Data
@TableName(value = "tn_statisticstwo")
public class StatisticsTwo extends Statistics {

    @TableId(type = IdType.AUTO)
    private int id; //主键id
    private String lineName_s; //线路名称
    public String companyName_s;//公司名称


    public void putValue(StatisticsTwoBo params, String currentDate) {
        companyName_s = params.getCompanyName_s();
        lineName_s = params.getLineName_s();
        String type = params.getR_s();
        Integer total = params.getTotal();
        if ("1".equals(type)) {
            aged_i = total;
        }
        if ("4".equals(type)) {
            loveCard_i = total;
        }
        if ("2".equals(type)) {
            buyTicket_i = total;
        }
        if ("3".equals(type)) {
            swipedCard_i = total;
        }
        if ("5".equals(type)) {
            unrecognized_i = total;
        }
        if ("9".equals(type)) {
            ipUpdate_i = total;
        }
        date_s = currentDate;
        all_i = aged_i + loveCard_i + buyTicket_i + unrecognized_i + swipedCard_i;
    }

}